package FeatureSelection;

import java.util.Arrays;

public class FeatureSelectionDataClass {
	
	int numberOfSelectedFeatures;
	int[] selectedFeaturesIndexes;
	double[] selectedFeaturesScores;

	FeatureSelectionDataClass()
	{
		numberOfSelectedFeatures = 0;
		selectedFeaturesIndexes = null;
	}	
	public int[] getSelectedFeaturesIndexes() {
		return selectedFeaturesIndexes;
	}
	
	public double[] getScoresOfSelectedFeaturesIndexes() {
		return selectedFeaturesScores;
	}
	

	public void setSelectedFeaturesIndexes(int[] selectedFeaturesIndexes, double[] selectedFeaturesScores) {
		this.selectedFeaturesIndexes = selectedFeaturesIndexes;
		numberOfSelectedFeatures = selectedFeaturesIndexes.length;
		this.selectedFeaturesScores = selectedFeaturesScores;
	}
	
	public boolean selectThisFeatureOrNot(int featureNo)
	{
		int returnValue = Arrays.binarySearch(selectedFeaturesIndexes, featureNo);
		if(returnValue<0)
			return false;
		else
			return true;
	}
}
